<?php 
	$objLogin = new usuarioCliente($objConn);
	
	if ( $_POST['login'] != '' ){
		$objLogin = new usuarioCliente($objConn);
		if ( !$objLogin->vericarUsuario(md5($_POST['login']), md5($_POST['senha'])) ){
			echo "<script>alert('Usuário ou senha inválido.')</script>";
		}else{
			if( $_SESSION[md5('cadastroCompleto')] == md5('NAO') && $strPagina != 'cadastroCompleta.php' ){
				echo "<script>window.location.href='cadastroCompleta.php';</script>";
			}
			echo "<script>window.location.href='paginaAcesso.php';</script>";			
		}		
	}	
	
if ( !$objLogin->logadoUsuario() ) {?>
        <form id="frmLogin" name="frmLogin" method="post" action="">
            <table width="100%" border="0" align="left" cellpadding="0" cellspacing="0">
              <tr>
                <td width="30%" align="left" valign="top"><strong>E-mail</strong>: </td>
                <td width="70%" align="left" valign="top"><input name="login" type="text" class="texta validate[required,minSize[4],maxSize[100]] text-input" value="" id="login" /></td>
              </tr>
              <tr>
                <td align="left" valign="top"><strong>Senha</strong>: </td>
                <td align="left" valign="top"><input name="senha" type="password" class="texta validate[required,minSize[3],maxSize[10]" value="" align="absmiddle" id="senha" />
                  <input name="bnt_ok" type="image" class="fakeSelectImg" id="bnt_ok" src="images/botao_ok.gif" align="bottom"/></td>
              </tr>
              <tr>
                <td colspan="2">Esqueceu sua senha? <a href="login_recupera.php">Clique aqui</a></td>
              </tr>
              <tr>
                <td colspan="2"  align="center">Não sou cadastrado.</ br><a href="cadastro_usuario.php"><img src="images/icones/icone_cadastro_txt.gif" border="0"></a></td>
              </tr>              
            </table>
          </form>
<?php } else { 
echo '<strong>'.base64_decode($_SESSION[md5('meuNome')]).'</strong>, seja bem vindo!';
?>
<div aling="center">
  <div align="center"><a href="sairAcesso.php"><img src="images/icon_sair.jpg" width="37" height="50" border="0" align="absmiddle" /></a></div>
</div>
<?php	 } ?>